﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Music : MonoBehaviour //脚本名与类名要一直,此代码脚本名为music
{
    public AudioSource musicSource; // 使用不同名称，如musicSource

    void Start()
    {
        musicSource = GetComponent<AudioSource>();
        musicSource.Play();
        DontDestroyOnLoad(gameObject);
    }
}

